<template>
  <div >  
       <section class="user-info">
      <div class="title">
        <p>班级列表</p>
      </div>
     
    <el-table
      :data="classsList"
      style="width: 100%">
      <el-table-column
        prop="major"
        label="专业"
        width="180">
      </el-table-column>
      <el-table-column
        prop="name"
        label="班级"
        width="180">
      </el-table-column>

      <el-table-column
        prop="academy"
        label="学院">
      </el-table-column>
      <el-table-column
        fixed="right"
        label="操作"
        width="100">
        <template slot-scope="scope">
         
            <el-button  type="text" size="small" @click="getClass(scope.row.id)">查看</el-button>
        
            </template>
      </el-table-column>
    </el-table>
    </section>
  </div>

</template>
<script>

import classs from "api/classs";
import teacher from "api/teacher";
export default {
  name: "index",
  data(){
    return{
      classs:'',
      loginInfo:'',
      classsList:[],
      importBtnDisabled: false, // 按钮是否禁用,
      loading: false,
    }
  },
  created() {
   this.loginInfo = this.$store.state.userinfo
    this.initClass()
  },
  methods: {
    initClass(){
        classs.getClassList(this.loginInfo.id).then(res=>{
          this.classsList=res.data.data.classs

        })
    },
    getClass(id){
          this.$store.state.userinfo.classId=id
    }

  }
}
</script>

<style scoped>

</style>

</script>
<style lang="stylus" scoped>
  .company-help {
    background: #e4e5e6;
    .user-info {
      font-size: 14px;
      background: #fafafa;
      margin-bottom: 20px;
      .title {
        background: #f0f1f3;
        height: 36px;
        line-height: 36px;
        p {
          display inline-block;
          height: 16px;
          line-height 16px;
          margin: 0 6px 0px 12px;
          padding-left: 6px;
          border-left: solid 4px #057ab8;
          vertical-align middle;
        }
      }
      .info {
        padding: 10px 0 10px 30px;
        .logo {
          display inline-block;
          width: 60px;
          height: 60px;
          margin-top: 8px;
          img {
            width: 100%;
            height: 100%;
          }
        }
        .info-right {
          display: inline-block;
          padding-top: 8px;
          min-height: 76px;
          line-height: 22px;
          margin-left: 12px;
          vertical-align: top;
          .account {
            font-weight: bold;
          }
        }
      }
    }
    .introduction {
      font-size: 14px;
      background: #fafafa;
      margin-bottom: 38px;
      .title {
        background: #f0f1f3;
        height: 36px;
        line-height: 36px;
        p {
          display inline-block;
          height: 16px;
          line-height 16px;
          margin: 0 6px 0px 12px;
          padding-left: 6px;
          border-left: solid 4px #057ab8;
          vertical-align middle;
        }
      }
      .intro {
        padding: 10px 0 10px 30px;
        li {
          padding: 10px;
          .icon-search {
            display:inline-block;
            width: 52px;
            height: 52px;
              background-image: url('/views/comp/features.png');
            background-position: 0 0;
          }
          .intro-detail {
            display: inline-block;
            margin-left: 12px;
            line-height: 20px;
            font-size: 12px;
            vertical-align: top;
            .intro-title {
              color: #0079bd;
              cursor: pointer;
            }
          }
        }
      }
    }
  }
</style>
